package tech.wangpai.service.impl;

import org.springframework.stereotype.Service;
import tech.wangpai.domain.User;
import tech.wangpai.service.LoginService;


@Service
public class LoginServiceImpl implements LoginService {
    @Override
    public User login(String username, String password) {
        if("admin".equals(username) && "admin".equals(password)){
            return new User("1","admin","admin",20);
        }else{
            throw new RuntimeException("用户不存在");
        }
    }
}
